﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Property
{
    public interface IPropertyAttributeHelper
    {
        T FindAttribute<T>(object property) where T : Attribute;

        /// <summary>
        /// Return whether the property has default value (settable by ValueTypeAttribute)
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        bool HasDefaultValue(object property);

        /// <summary>
        /// Get the default value of the property.
        /// </summary>
        /// <param name="property"></param>
        /// <returns></returns>
        object GetDefaultValue(object property);

        Type GetDefaultType(object property);

        bool HasAlias(object property);
        string getAlias(object property);


        PropertyCacheOptions GetPropertyCacheOption(object property);
        DatabaseCacheOptions GetDatabaseCacheOption(object property);


        IPropertyDictionary PropertyDictionary { get; set; }
    }
}
